Skip to content

AIChat: popup and chat default configuration#33225

Merged
anna-shakhova merged 5 commits intoDevExpress:26_1from
anna-shakhova:26_1__ai_chat_popup
Apr 14, 2026
Merged

AIChat: popup and chat default configuration#33225
anna-shakhova merged 5 commits intoDevExpress:26_1from
anna-shakhova:26_1__ai_chat_popup

Conversation

@anna-shakhova
Copy link
Copy Markdown
Contributor

No description provided.

@anna-shakhova anna-shakhova self-assigned this Apr 10, 2026
@Alyar666 Alyar666 self-requested a review April 10, 2026 13:48
@anna-shakhova anna-shakhova marked this pull request as ready for review April 13, 2026 06:53
@anna-shakhova anna-shakhova requested a review from a team as a code owner April 13, 2026 06:53
Copilot AI review requested due to automatic review settings April 13, 2026 06:53
@anna-shakhova anna-shakhova requested a review from a team as a code owner April 13, 2026 06:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the DataGrid AI Assistant integration by introducing default Popup/Chat configuration, exposing additional styling hooks for the Chat empty view, and wiring option-change handling so aiAssistant.popup / aiAssistant.chat updates can be applied at runtime.

Changes:

  • Export Chat MessageList empty-view CSS class constants and use them to build a localized empty view template in AIChat.
  • Add default Popup/Chat options (including a clear-chat toolbar button) and support updating Popup/Chat options via AIChat.updateOptions.
  • Introduce aiAssistant option-change helpers + Jest tests, and update AI Assistant view/controller logic to react to option changes.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
packages/devextreme/js/__internal/ui/chat/messagelist.ts Exports empty-view CSS class constants for reuse by AI Chat integration.
packages/devextreme/js/__internal/grids/grid_core/m_types.ts Extends aiAssistant options typing with popup/chat option bags.
packages/devextreme/js/__internal/grids/grid_core/ai_chat/types.ts Simplifies AIChatOptions to rely on popupOptions/chatOptions rather than bespoke callbacks.
packages/devextreme/js/__internal/grids/grid_core/ai_chat/const.ts Introduces default Popup/Chat options and the clear-chat icon constant.
packages/devextreme/js/__internal/grids/grid_core/ai_chat/ai_chat.ts Builds default chat config (empty view template), adds clear button, and supports option updates.
packages/devextreme/js/__internal/grids/grid_core/ai_chat/ai_chat.test.ts Updates/extends tests for clear button presence and updateOptions behavior.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/utils.ts Adds helpers to detect which aiAssistant.* options changed.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/const.ts Adds AI Assistant popup offset constant.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/ai_assistant_view.ts Creates Popup/Chat option objects, message store, and handles aiAssistant option changes.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/ai_assistant_view_controller.ts Syncs toolbar item and active state based on AI Assistant visibility and option changes.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/tests/utils.test.ts Adds Jest coverage for option-change helper predicates.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/tests/ai_assistant_view.test.ts Updates tests for new Popup/Chat config wiring and optionChanged behavior.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/tests/ai_assistant_view_controller.test.ts Updates tests for subscription behavior and enabled/title option handling.

Copilot AI review requested due to automatic review settings April 13, 2026 10:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 5 comments.

Copilot AI review requested due to automatic review settings April 13, 2026 14:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 4 comments.

return {
...DEFAULT_CHAT_OPTIONS,
emptyViewTemplate: (_data, container): void => {
const $image = $('<div>')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we extract everything related to the DOM into a separate file – dom.ts? (For example, as it is implemented in sticky_columns)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently there is not so much DOM related code in class, lets do it later if we see it is needed (after messageTemplate for example)

};
}

public updateOptions(options: AIChatOptions, updatePopup: boolean, updateChat: boolean): void {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: rename updatePopup -> needToUpdatePopup, updateChat -> needToUpdateChat

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets fix it in next PR

@anna-shakhova anna-shakhova merged commit ea5abe2 into DevExpress:26_1 Apr 14, 2026
103 checks passed
@anna-shakhova anna-shakhova deleted the 26_1__ai_chat_popup branch April 14, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants